<div class="main-title">
    <h1 class="float-left">
		Add Career Path
	</h1>
</div>
<?php
$form = $this->beginWidget('PsActiveForm', array(
	'id' => 'add-hierarchy-form',
	'enableAjaxValidation' => false,
	'enableClientValidation' => true,
	'clientOptions' => array(
		'validationDelay' => 200,
		'inputContainer' => 'tr',
		'validateOnSubmit' => true,
		'validateOnChange' => false,
	)
		));
?>
<div class="form relative grid_16">
	<div id="step1" class="section">
		<div class="block">
			<table class="form-table">
				<tr>
					<th scope="row" width="200">
						<?php echo $form->labelEx($hierarchy, 'name', array('label' => 'Career Path Name')); ?>
					</th>
					<td>
						<div class="">
							<?php echo $form->textField($hierarchy, 'name', array('size' => '40')); ?>
							<?php echo $form->error($hierarchy, 'name'); ?>
						</div>
					</td>
				</tr>
				<tr>
					<th scope="row" width="200">
						Number of levels:
					</th>
					<td>
						<input type="text" id="no-of-levels" size="5"><br/>
					</td>
				</tr>
				<tr>
					<th scope="row" width="200">
						Main promotion criteria: 
					</th>
					<td>
	<!--					<input type="checkbox" name="criteria[]" value="gross_comm" checked="checked">Total Gross Commissions<br>
						<input type="checkbox" name="criteria[]" value="net_comm">Total Net/Earned Commissions<br> -->
						<input type="radio" name="total_comm" value="gross_comm" checked /> Total Gross Commissions<br>
						<input type="radio" name="total_comm" value="net_comm" /> Total Net/Earned Commissions<br>
					</td>
				</tr>
				<tr>
					<th scope="row" width="200">
						Other promotion criteria <i>(optional)</i>: 
					</th>
					<td>
						<input type="checkbox" name="criteria[]" value="units_transacted">Total Units Transacted<br>
						<input type="checkbox" name="criteria[]" value="units_sold">Total Units Sold<br>
						<input type="checkbox" name="criteria[]" value="agents_downline">Total No Of Downline Agents<br>
						<input type="checkbox" name="criteria[]" value="agents_recruited">Total No Of Recruited Agents<br>
					</td>
				</tr>
				<tr>
					<th scope="row" width="200">
						Effective From: 
					</th>
					<td>
						<?php
						$form->widget('PsJuiDatePicker', array(
							'model' => $hierarchy,
							'attribute' => 'from_date',
							'options' => array(
								'showButtonPanel' => false,
								'changeYear' => true,
								'dateFormat' => 'dd-mm-yy',
							),
						));
						?>
					</td>
				</tr>
			</table>
			<div class="form_buttons">
				<a href="<?php echo $this->createUrl('hierarchy/index', array()); ?>" class="link-button no-margin">Cancel</a>
				<input class="link-button green no-margin" type="button" value="Next" name="nextAction">
			</div>
		</div>
	</div>
	<div id="step2" class="section" style="display:none;">
		<div class="block">
			<h2>
				Enter Designation Names
			</h2>
			<table id="hierarchy_table" class="form-table"></table>
			<div class="form_buttons">
				<input class="link-button no-margin" type="button" value="Back" name="backAction">
				<input class="link-button green no-margin" type="button" value="Save" name="submitAction">
			</div>
		</div>
	</div>

</div>
<?php $this->endWidget(); ?>